From: Jim Blandy Date: Sat, 12 Jun 1993 16:00:47 +0000 (+0000) Subject: * keyboard.c (read_key_sequence): When we generate a prefix symbol X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95378 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=14ec05a6aa653f32678c84ccbe65360e05fcc00e;p=emacs.git * keyboard.c (read_key_sequence): When we generate a prefix symbol for a mouse event, store the actual mouse event in unread_command_events, so we don't lose it if the symbol isn't bound to a prefix. --- diff --git a/src/keyboard.c b/src/keyboard.c index 822f336b65e..c78c43c2d89 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3816,8 +3816,13 @@ read_key_sequence (keybuf, bufsize, prompt) if (t + 1 >= bufsize) error ("key sequence too long"); keybuf[t] = posn; - keybuf[t+1] = key; - mock_input = t + 2; + mock_input = t + 1; + + /* Put the rest on unread_command_events - that + way, if the symbol isn't bound to a prefix map, + then we don't lose the actual mouse event. */ + unread_command_events = + Fcons (key, unread_command_events); /* If we switched buffers while reading the first event, replay in case we switched keymaps too. */